feat: support lp_norm operator on metax#1359
Open
LindseyMei wants to merge 1 commit into
Open
Conversation
Add MetaX backend for lp_norm: - Create metax/lp_norm_metax.h and metax/lp_norm_metax.maca - Wire MetaX dispatch into operator.cc (CREATE/GET/CALCULATE/DELETE) - Make lp_norm/cuda/kernel.cuh compile on MACA by excluding MetaX from the CUDART_VERSION >= 12090 ::cuda::maximum() branch Validation: python3 test/infiniop/lp_norm.py --metax passes on MetaX C500 (F16/BF16/F32, contiguous and strided axis=-1 cases). Signed-off-by: LindseyMei <648816901@qq.com>
Author
MetaX lp_norm Performance ReportEnvironment
What changedAdded a MetaX backend for the Correctness
Performance (libinfiniop)
Observations
Known limitations
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add MetaX backend for
lp_norm.Changes
src/infiniop/ops/lp_norm/metax/lp_norm_metax.handsrc/infiniop/ops/lp_norm/metax/lp_norm_metax.maca, reusing../cuda/kernel.cuh.operator.cc(CREATE / GET workspace size / CALCULATE / DESTROY).lp_norm/cuda/kernel.cuhcompile on MACA by excluding MetaX from theCUDART_VERSION >= 12090::cuda::maximum()branch; MetaX uses thecub::Max()/ lambda fallback.Validation
python3 test/infiniop/lp_norm.py --metaxpasses on MetaX C500 for F16/BF16/F32, including contiguous and strided axis=-1 cases.clang-format --dry-run --Werrorclean on all 4 modified/new files.xmake -y -j4+xmake install -ysucceeded.Notes
mainbranch.cub::Max()path is already used by other MetaX operators (e.g.reduce/cuda/reduce.cuh).